﻿//Create By Leven
//Copyright 2008 LevenStudio
//http://leven.com.cn/
//For LevenBlog2.0
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;

namespace LevenBlog.Core.Entities
{
    /// <summary>
    ///表lb_user
    /// </summary>
    [Serializable]
    [DataContract(Name = "user")]
    [Table("lb_user", Info = "")]
    public class lb_user : BaseEntity
    {
        [DataMember]
        [Column("id", DataType.Int32, Length = 4, CanNull = false, AutoIncrement = true, PrimaryKey = true)]
        public int id { get; set; }

        [DataMember]
        [Column("typeid", DataType.Int32, Length = 4, CanNull = false)]
        public int typeid { get; set; }

        [DataMember]
        [Column("name", DataType.VarChar, Length = 100, CanNull = false)]
        public string name { get; set; }

        [DataMember]
        [Column("password", DataType.VarChar, Length = 200, CanNull = false)]
        public string password { get; set; }

        [DataMember]
        [Table("lb_userinfo")]
        public lb_userinfo userinfo { get; set; }

        [DataMember]
        [Table("lb_usertype")]
        public lb_usertype usertype { get; set; }

        [DataMember]
        [Column("postnum", DataType.Int32, Length = 4, CanNull = false)]
        public int postnum { get; set; }

        public lb_user()
        {
            this.id = -1;
            this.name = string.Empty;
            this.password = string.Empty;
            this.typeid = -1;
            this.userinfo = null;
            this.usertype = null;
            this.postnum = 0;
        }

    }
}

